package com.nsl.my_youlai.bbu2.model.bo.bbu.instances;

import com.nsl.my_youlai.bbu2.enums.BbuModelEnum;
import com.nsl.my_youlai.bbu2.enums.BoardTypeEnum;
import com.nsl.my_youlai.bbu2.enums.NetGenerationEnum;
import com.nsl.my_youlai.bbu2.enums.VendorEnum2;
import com.nsl.my_youlai.bbu2.model.bo.bbu.*;
import com.nsl.my_youlai.bbu2.model.bo.bbu.rules.BbuDt5gEmb6212SlotRules;
import com.nsl.my_youlai.mystar.NslUtilList;
import lombok.Data;

import java.util.List;

@Data
public class BbuDt5gEmb6212 extends Bbu2 {
    static private BbuDt5gEmb6212SlotRules rules;

    static private String baseBoardSlots="2,3,5,6,7";
    static private String controlBoardSlots="0,1";
    static  private String powerBoardSlots="4";

    public BbuDt5gEmb6212() {
        super();
        init();
    }

    public BbuDt5gEmb6212(int excelRowIndex, VendorEnum2 vendor, BbuModelEnum bbuModelEnum, Integer nodeId) {
        super(excelRowIndex,vendor,bbuModelEnum,nodeId,baseBoardSlots,controlBoardSlots,powerBoardSlots);
        init();
    }


    @Override
    public boolean equals(Object o){
        return super.equals(o);
    }


    private void init(){
        this.setVendor(VendorEnum2.DA_TANG);
        this.setBbuModelEnum(BbuModelEnum.BBU_EMB6216);
        rules =new BbuDt5gEmb6212SlotRules(
                VendorEnum2.DA_TANG,
                1,
                new NetGenerationEnum[]{NetGenerationEnum.G5},
                baseBoardSlots,
                controlBoardSlots,
                powerBoardSlots
        );
        this.setSlotRules(rules);
    }

    @Override
    public void bbuCheck(){
        //slot配合检查
        //最小配置检查
        for (int i = 0; i < this.soltIndexList.size(); i++) {
            Integer slotIndex=this.soltIndexList.get(i);

        }
        //主控混插检查

        //基带数量过多检查

        //电源能力检查

        //垮tac

    }


    /**
     * 从source中，根据 cutoffsStringIndex,把摘出来的board 放入 this.bbu 中
     * 并从source中，删除掉这些 boards
     * @param sourceBbu
     * @param cutoffsStringIndex //4base_1main_1power_1frame_1fun
     */
    @Override
    public void integrateBoards(Bbu2 sourceBbu, String cutoffsStringIndex) {
        super.integrateBoards(sourceBbu,cutoffsStringIndex,baseBoardSlots,controlBoardSlots,powerBoardSlots);

    }

    /**
     *
     * @param bbu
     * @param slots like "1,2,3"
     * @param boardTypeEnum
     * @param boardCounter
     */

}
